<?php 
defined('_JEXEC') or die('Restricted access'); 
$Itemid = JRequest::getVar( 'Itemid', 0, 'get', 'int' );
$ordering = ($this->lists['order'] == 'ordering');
JHTML::_('behavior.tooltip');
//jimport('joomla.filesystem.folder');
//jimport('joomla.filesystem.file');
jimport('joomla.filesystem.path');
JHTML::stylesheet('base.css', JURI::root().'components/com_simplelisting/css/');
JHTML::stylesheet('listing.css', JURI::root().'/components/com_simplelisting/css/themes/'.$this->select_theme.'/');

?>
<script language="javascript" type="text/javascript"></script>
                   
    <div id="listing_details"><!-- Start main container div-->
	<div id="listing_details_inner"><!-- Start inner div -->
            <div class="header">
               <table class="general_details">
                   <tbody>
                       <tr>
                           <td class="cw_title_main">
                                <?php echo JText::_('FT_AUTHORS')?>
                           </td>

                       </tr>
                   </tbody>
               </table>
            <span id="cw_back_button_top">
            <input type="button" onClick="history.go(-1);return false;" value="<?php echo JText::_('BT_BACK'); ?>" class="button">
            </span>
            </div>
            <div style="width:100%; height:5px;"></div>

            <form action="" method="post" name="adminForm" ><!-- Start listing form -->
                    <?php
                    $k = 0;
                    for ($i=0, $n=count( $this->items ); $i < $n; $i++)
                    {
                    $row = &$this->items[$i];
                    $link 	= JRoute::_( 'index.php?option=com_simplelisting&task=showAuthor&cid[]='.$row->id);
                    {
                    ?>
                <div class="cw_author_container"><!--Start list item container -->
                    <span class="cw_author_details">
                        <b><?php echo JText::_('LABEL_NAME')?>:</b> <?php echo $row->name?>
                    </span>

                    <?php if ( !empty($row->usercountry) ) { ?>
                        <span class="cw_author_details">
                            <?php echo '<b>'.JText::_('LABEL_COUNTRY').': </b>'. $row->usercountry ?>
                        </span>
                    <?php } ?>
                    <span class="cw_author_button">
                        <input type="button" onClick="javascript:window.location='<?php echo $link; ?>'" value="<?php echo JText::_('BT_AUTHORS'); ?>" class="button" >
                    </span>
                    
                    
                </div><!--End list item container -->

                        <?php
                        }
                            $k = 1 - $k;
                        }
                        ?>
                <div id="sl_pagnation">
                    <table class="pagnation" width="100%" border="0">
                       <tbody>
                           <tr>
                               <td>
                                <?php  echo $this->pagination->getListFooter(); ?>
                               </td>      
                           </tr>
                        </tbody>
                    </table>
                </div>
                <input type="hidden" name="option" value="com_simplelisting" />
                <input type="hidden" name="view" value="authors" />
                <input type="hidden" name="authors" value="<?php echo $this->simplelisting->id; ?>"/>
                <input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
                <input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
            <?php if ( $this->params->get( 'show_poweredby' ) ) : ?>
                <div class="cw_powerbyfront">
                    <span class="cw_powerbyfront"><?php echo JTEXT::_('POWEREDBY_MSG'); ?> <a href="http://www.celtaweb.com" target="_blank" title="CeltaWeb">CeltaWeb</a> </span>
                </div>
            <?php endif ?>
        </form><!-- End listing form -->
    </div><!-- End inner div -->
</div><!-- End main container div -->
